#include <QtGui/QApplication>
#include <QtGui/QIcon>
#include <QtGui/QMenu>
#include <QtGui/QSystemTrayIcon>
#include "Widget.h"

int main(int argc, char *argv[])
{
	QApplication a(argc, argv);
	Widget w;

	QSystemTrayIcon trayIcon;

	QMenu * trayMenu = new QMenu("Tray Menu");
	trayMenu->addAction("E&xit", qApp, SLOT(quit()));

	trayIcon.setContextMenu(trayMenu);
	trayIcon.setIcon(QIcon(":/Boofer-QML/images/sticky.png"));
	trayIcon.show();

	QObject::connect(&trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), &w, SLOT(show()));

	return a.exec();
}
